﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcProject.Models.TemporaryWorkers>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>临时工列表</h2>

    <table>
        <tr>
            <th>
                姓名
            </th>
            <th>
                身份证
            </th>
            <th>
                状态
            </th>
            <th>
                合同开始时间
            </th>
            <th>
                合同结束时间
            </th>
            <th></th>
        </tr>

    <% if(Model!=null)foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: item.WorkerName %>
            </td>
            <td>
                <%: item.WorderCardCode %>
            </td>
            <td>
                <%: item.WorkerStatus %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.ContractStartDate) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.ContractEndDate) %>
            </td>
            <td>
                <%: Html.ActionLink("编辑", "Edit", new { id=item.guid }) %> |
                <%: Html.ActionLink("详细信息", "Details", new { id=item.guid })%> |
                <%: Html.ActionLink("删除", "Delete", new { id=item.guid })%>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("新增临时工", "Create") %>
    </p>

</asp:Content>

